//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#pragma once

#include "Audio/Resources/AudioSample.h"

namespace Engine
{
namespace Audio
{

	//
	// Audio Loader
	//

	struct AudioLoader
	{
	// methods
	public:
		AudioLoader ();
		
		void Register (ResourceManager *rm);
		void Unregister (ResourceManager *rm);
		
		static bool LoadFromName (ResourcePtr &resource, uni_c_string filename, void *parameter,
									const Resource::ResLoadParams &loadParams, const EngineSubSystemsRef ess);
		
		static bool LoadFromFile (ResourcePtr &resource, const RFilePtr &file, void *parameter,
									const Resource::ResLoadParams &loadParams, const EngineSubSystemsRef ess);

	private:
		static bool _LoadFromName (ResourcePtr &resource, uni_c_string filename, void *parameter,
									const AudioSample::AudioLoadParams &loadParams, const EngineSubSystemsRef ess);
		
		static bool _LoadFromFile (ResourcePtr &resource, const RFilePtr &file, void *parameter,
									const AudioSample::AudioLoadParams &loadParams, const EngineSubSystemsRef ess);
	};


}	// Audio
}	// Engine
